// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,2) == 0;
	question = "special";
	text1 = "You enter Stormhold, the palace and headquarters for the leader of the Storm Plains. It is an odd mix of ancient and Shaper architecture. Most of the buildings were built by the Shapers, but there are frequent traces of something far older.";
	text2 = "Normally, this palace would be quiet and imposing. It has several large buildings, surrounded by tranquil grounds. Now, in this time of war, other changes have been made.";
	text3 = "For example, there is a large army encampment in the entry courtyard. There are lots of soldiers camping here, sitting around campfires on the broad cobblestones. They must be here to protect the general in case of rebel attack.";
	text4 = "The buildings of the hold are surrounded by high, rough sandstone walls. To the north and south, you can see passages. They must lead into chambers dug out of the solid stone.";
	action = SET_SDF 42 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,3) == 0 && gf(41,3) == 0;
	question = "special";
	text1 = "There are three Shapers here, each of them staring into a tall, polished obelisk of purple. Staring into the stone, you can see faint, fuzzy shapes.";
	text2 = "They are creations, patrolling in the woods to the east. These Shapers are completely lost in thought, directing their charges through the wild.";
	text3 = "You note that one of the crystals has shattered recently. Serviles have not yet cleared away the debris. These powerful stones must not be entirely stable."; 
	action = SET_SDF 42 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,4) == 0;
	question = "special";
	text1 = "You enter the throne room of General Alwan. Leader of the Storm Plains. Member of the Shaper Council. War hero. Scourge of the rebels.";
	text2 = "You are stunned by what you see.";
	text3 = "General Alwan has been grievously damaged. His body is shattered. His skin is covered with burns. He stands in the middle of a runic circle by the north wall. A metal framework keeps him upright.";
	text4 = "Conduits cross the floor around him. Two of them actually enter his body, sustaining him with energy. One of his arms is sickeningly emaciated. His head lolls to one side.";
	text5 = "Then the hero of the Storm Plains sees you. He raises his head and lets out a long gurgle. _Ghahhh ... You. You there. Yessss._ His hand weakly waves you forward.";
	text6 = "_I have waited for you. Come and speak. Do not be afraid. If you obey our lawssss, you have no problem from me._";
	action = SET_SDF 42 4 1;
	code =
		 if (gf(41,3) > 0) {
		 	rs(5); rs(6);
		 	}
	break;
		
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,5) == 0 && gf(41,3) == 0;
	question = "special";
	text1 = "This small building is full of bustling activity. You see a kitchen and, to the east, a pantry. The serviles are busy making food for the fort.";
	text2 = "Serviles constantly grab loaves of bread, pots of stew, and other rations and carry them off to the soldiers and residents. Another directs the cooking. She constantly shouts at the others, trying to keep the kitchen running quickly.";
	text3 = "As you look around, you notice that there are more than serviles here. There are a few soldiers. They constantly watch the preparation of the food. Perhaps they are worried about poison or similar sabotage.";
	action = SET_SDF 42 5 1;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,6) == 0;
	question = "special";
	text1 = "This room contains the private stock of wine for Stormhold. It is truly a drinker's paradise. Large kegs of the finest vintages, brought here from all over the Storm Plains and beyond.";
	text2 = "If the sign outside is to be believed, the wine here is reserved for members of the Council. There are several crystal goblets on the table. You note that they are completely free of dust."; 
	action = SET_SDF 42 6 1;


begintalknode 6; // rawal papers
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This pedestal is covered with tomes on Shaping techniques. They are pretty bulky, and they cover fairly obscure topics. Probably not worth stealing.";
	text2 = "Then you note that one of the books is much newer than the others. It is a slender survey called 'Canister - Creation and Analysis.' This must be what Rawal wanted. You slip it into your pack.";
	code =
		if ((gf(42,8) == 0) && (gf(2,1) == 5)) {
			set_spec_item(6,1);
			sf(42,8,1);
			}
			else rs(2);
	break;
		
begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = get_sdf(42,9) == 0 && gf(41,3) == 0;
	question = "special";
	text1 = "You slip into one of the rear chambers of the main building. Nobody has given you permission to be in here.";
	text2 = "You hear the echo of footsteps to the south. You also notice the pressure plates set into the floor, no doubt connected to alarms or worse.";
	text3 = "When in here, some care may be required.";
	action = SET_SDF 42 9 1;


begintalknode 8; // poison case
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This pantry is full of closely-spaced shelves, each of which is completely packed with bottles and jars. It is a dizzying collection of practically every known alchemical ingredient. And you have no idea what any of it does.";
	text2 = "However, after a quick search, you do find the bottle Pepoy described to you. Fortunately, it was still near the front of one of the shelves. You quickly (and carefully) pocket it.";
	code =
		if (gf(42,7) == 1) {
			set_spec_item(18,1);
			sf(42,7,2);
			}
			else rs(2);
	break;
	

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  STORMHOLD PRISON";
	text3 = "  Check in all prisoners with Agent or ranking officer on duty.";


begintalknode 10;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Private. Intruders will be considered spies.";

begintalknode 11;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The little device on the floor lets out a long, hideous shriek. Any remaining defenders in this fortress now have a fairly good idea where you are.";
	code =
		sf(42,11,1);
	break;
	
begintalknode 12;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You deliver another blow to one of the crystal pylons sustaining Alwan. It does not shatter. The protective magic on it may be too strong for you to be able to destroy it.";
	text2 = "However, you have damaged it. A large crack appears in the side. It stops sending energy to sustain Alwan. Instead, the energy leaks out, scorching the air nearby.";

begintalknode 13;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You examine one of the pylons. They are unusually powerful magical constructs. They send the flow of energy that sustains Alwan's life.";
	text3 = "You examine one of the pylons. They are unusually powerful magical constructs. They sent the flow of energy that sustained Alwan's life.";
	action = DEP_ON_SDF 101 4 0;
	
	
begintalknode 14;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "General Alwan long since came to terms with the fact that he wanted to die. Only his sense of duty kept him chained to this painful parody of a life.";
	text2 = "Now that he is mortally wounded, however, he is unable to react to it. The power coursing through him flies out of control. A jolt of energy erases his ability to think. His body goes into a hideous chain of spasms.";
	text3 = "Then, in a final, spectacular flash of light, his body converts into a fine, white powder. The tale of General Alwan, scourge of the rebels, comes to an end.";
	text4 = "You have killed a member of the Shaper Council. You have permanently earned the hatred of the Shapers and their allies.";
	code =
		if (gf(100,11) == 0) 
			sf(100,11,1);
			else rs(4);
	break;


begintalknode 15;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the pylons attached to Alwan via the conduits detects that his body is suffering damage. The creation trapped inside the crystal begins to repair the damage, knitting his torn flesh and bones faster than you can hack at it.";

begintalknode 16;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the residents of Stormhold shouts out an alarm. All guards and creations in earshot spring into action. Unless you can reach the city gates soon, you are about to get a lot of company.";

begintalknode 17;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You flip through this lab journal, alert, as always, for helpful information. You are not disappointed. Among all the gibberish, a hastily scrawled note in a border is very intriguing:";
	text2 = "_Gemstones need not only be used for wands. Treat the stone with the proper creation body part on an enchanted anvil, and the latent magic within the offal can infuse the stone._";

begintalknode 18;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 19;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";


begintalknode 20;
	state = -1;
	nextstate = 20;
	condition = has_spec_item(18) && gf(42,10) == 0 && gf(101,4) == 0;
	question = "Name";
	text1 = "You look at the clean goblets. You look at the wine. You think about the vial of poison in your pouch. The guards watch the food being made, but they have not been sufficiently careful about guarding the wine.";
	text2 = "This might have been useful knowledge, but the fort is on alert. Nobody is going to be taking Alwan wine any time soon.";
	text3 = "Perhaps a small amount of poison, rubbed inside a goblet, could be taken to Alwan.";
	code =
		if (gf(42,11) > 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode 21;
	state = 20;
	nextstate = -1;
	condition = gf(42,11) == 0;
	question = "Poison the goblet.";
	text1 = "You quickly bring out and open the little bottle. You pour a small amount into a goblet, rolling it around to spread the poison thinly.";
	text2 = "As you consider what to do with the other goblets, you hear something. Footsteps. Someone is approaching from the south.";
	text3 = "You can only hope that someone is coming for wine for Alwan. However, it would be very awkward to be caught back here now.";
	action = END_TALK;
	code =
		sf(42,10,1);
	break;

begintalknode 22;
	state = 20;
	nextstate = -1;
	condition = 1;
	question = "Leave the goblets alone.";
	text1 = "You turn away.";
	action = END_TALK;

begintalknode 23;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You listen carefully and manage to hear one of the serviles opening a keg and decanting some wine into a glass.";
	text2 = "Then, after a silent, tense moment, you hear the servile walking out of the side room.";	

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "When you get close to General Alwan, he motions for you to sit on one of the benches near him. The hum and crackle of magical energy fills the air. You note that the smell is not as bad as you expected. Mainly ozone with a hint of smoke.";
	text2 = "General Alwan inspects you. You note, with some surprise, that he does not appear disgusted or disdainful. He looks at you from his perch in a calm and analytical way.";
	text3 = "He is a man who has learned in his travels, sometimes, at great cost, that you can never be truly sure who will turn out to be loyal or a rebel. Or who will be good and who will be evil.";
	text4 = "He says, _I'm sure you wonder why I have had you brought here. I have received a message from the enemy. It mentions you. By name and description. I have called you here to ask you for your help._";
	text5 = "General Alwan says, _You still wish to speak. I will spare a limited amount of time for it._ The more time you spend around him, the more it strikes you how painful his existence must be.";
	text6 = "He can never sit. The metal frame holds him up. A pair of conduits enters his thighs, feeding him directly with essence and power. That can't feel good. And, while his dedication must help sustain him, you suspect that wine plays a large part too.";
	action = INTRO;
	code =
		if (gf(42,1) == 0)
			sf(42,1,1);
	break;
	
begintalknode 31;
	state = 30;
	nextstate = 31;
	condition = gf(42,1) == 1;
	question = "Tell me about the message you received.";
	text1 = "Alwan nods. _It is quite unusual._ You hear a strange gurgle, coming out of somewhere in Alwan's midsection. He waits for the noise to cease and continues.";
	text2 = "_As you may know, I am the one whose leadership has finally stopped the rebel advance. My forces pushed their army past the mountains to the east and I rebuilt a line of three forts to hold them back._";
	text3 = "_Now we are in stalemate. Shaper forces here. Drakons and their minions on the other side. Our creations savage each other in the wild lands between._";
	text4 = "_That is where things have been, each of us looking for advantage. Then I received the message._";

begintalknode 32;
	state = 31;
	nextstate = 32;
	condition = 1;
	question = "Go on.";
	text1 = "_It is from Ghaldring. That beast is the leader of the drakons. Or, at least, he was. From Gazaki-Uss, their fortress at the far edge of the contested territory. He sent a servile carrying it to Fort Defiance._";
	text2 = "He lets out a short, gurgling laugh. _Fortunately, the servile was not killed on sight._";
	text3 = "_It invites us to send an envoy to Gazaki-Uss to negotiate certain details. But this is the interesting part._ Alwan pauses for a moment to regain his breath.";
	text4 = "_The invitation is extended to only one person. You._";

begintalknode 33;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "How do they know about me?";
	text1 = "_It is a good question. It is not because you are a spy. They would never call attention to one of their spies in such a way._";
	text2 = "_Perhaps they heard a tale of your travels. Or perhaps you met one of their spies and he or she or it carried your name to them._";

begintalknode 34;
	state = 32;
	nextstate = -1;
	condition = 1;
	question = "You are sure it was me they wanted?";
	text1 = "_Their description of you was precise. As if someone who helped to draft the message knew you personally._ He smiles. _Met any spies lately?_";

begintalknode 35;
	state = 32;
	nextstate = 33;
	condition = 1;
	question = "What exactly do you want from me?";
	text1 = "_I want you to do your duty to serve the Shapers. I will let you cross the line. I will give you what you need to cross the ravaged plains beyond safely._";
	text2 = "_You will meet with the drakons. You will hear the offer they make and return it. And, more importantly, you will return with information about Gazaki-Uss. You will let us know about the fortress._";
	text3 = "_How big it is. How many troops. What it appears to be for. Who is there. That is what I require, and you will be very, very well paid for quality information._";
	text4 = "_You are also welcome to any treasure or training you can wheedle out of the drakons while you are there._";
	text5 = "He makes a little motion with his hand. A servant brings a goblet of wine to him. He takes a deep swallow.";
	
begintalknode 36;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "Would this be dangerous?";
	text1 = "_Perhaps. Maybe the drakons have some reason to lure you there and eat you. Perhaps you may suffer a mishap in the wastes. Maybe you will fall victim to the natural mental instability of the creatures._";
	text2 = "_But I do not think that they specifically intend you harm. For the moment._";

begintalknode 37;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "What sort of reward?";
	text1 = "_That depends on the quality of the information you provide. If you genuinely help us, your pay will be considerable._";


begintalknode 38;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "And you want to hear what the drakons have to say, of course?";
	text1 = "Alwan shrugs. A painful gesture for someone in this position, but sometimes necessary.";
	text2 = "_Some of the Shapers want to negotiate a peace with the rebels. I do not. I plan to drive them into the sea._";
	text3 = "_Any offers they make would interest me, but they will not change my plans._";

begintalknode 39;
	state = 33;
	nextstate = -1;
	condition = 1;
	question = "I will not be a spy.";
	text1 = "_And I will not compel you. I could force you to do this thing. I could bind you, throw you over the line, and have you executed if you return with no information._";
	text2 = "_I will not. I can use allies, even unusual ones. So leave me. Return if you change your mind._";
	action = END_TALK;
	
begintalknode 40;
	state = 33;
	nextstate = 34;
	condition = 1;
	question = "I will help you.";
	text1 = "Alwan nods. _I thought that you might. You have a look about you that is ... I recognize it. I can give you more information on your mission, should you require it._";
	text2 = "_Normally, I would not trust and aid a servile in these circumstances. But it should be known that even old, inflexible Alwan can bend the rules in times of need._";
	text3 = "He snaps his fingers. A servant brings him a fresh goblet of wine and an amulet. He gives the latter item to you. _That will preserve you in the wastes._";
	text4 = "Now that you have agreed to aid him, he looks at you closely. Something about you seems to be bothering him.";
	code =
		if (creature_type(pc_num()) != 46) 
			rs(2);
		if (has_spec_item(2) == 0)
			set_spec_item(2,1);	
			else rs(3);
		sf(42,1,2);
		sf(42,12,1);
		toggle_quest(12,1);
	break;
	
begintalknode 41;
	state = 34;
	nextstate = 35;
	condition = 1;
	question = "What is wrong?";
	text1 = "For a moment, Alwan becomes distracted. This is not a common occurrence. _You look ... You look similar to someone I ..._ He shakes his head.";
	text2 = "_No. Just similar._ He struggles to concentrate again.";

begintalknode 42;
	state = 35;
	nextstate = 30;
	condition = 1;
	question = "You recognize me?";
	text1 = "General Alwan rapidly regains his firm composure. _I have met many people in my travels. For you to resemble one of them slightly is only to be expected. My condition sometimes causes me to ... drift._";
	text2 = "_We will speak no more of it. I can aid you with your mission, if you are not ready to depart._";
		
//begintalknode 33;
//	state = 32;
//	nextstate = -1;
//	condition = 1;
//	question = "Tell me about Gazaki-Uss.";
//	text1 = "_There is little I can tell. None of our agents have ever been inside. It is a large fortress in the mountains at the east edge of the .";
//	text2 = "";

begintalknode 43;
	state = 35;
	nextstate = 30;
	condition = 1;
	question = "I'd like to discuss something else.";
	text1 = "General Alwan rapidly regains his firm composure. _Of course. I can aid you with your mission, if you are not ready to depart._";

begintalknode 44;
	state = 30;
	nextstate = 37;
	condition = gf(42,1) > 1;
	question = "I would like to learn what has been happening in the Storm Plains.";
	text1 = "General Alwan nods. He starts to respond, but a brief set of muscle spasms delays his words. When he regains control, he says, _A fair question. You need to understand our situation._";
	text2 = "_Before I was elevated to the Council, the facts on the ground in the Storm Plains were bad. The forts in the eastern mountains were under constant assault. The enemy was able to regularly pass forces through them. Several cities were destroyed._";
	text3 = "_Then I took control. I rearranged our forces. I drove the enemy back. And, most importantly, I restored Shaper law to its proper place as guide of our lives._";

begintalknode 45;
	state = 30;
	nextstate = 40;
	condition = gf(42,1) > 1;
	question = "Tell me more about you.";
	text1 = "General Alwan drains a goblet of wine and sighs. You have made an impertinent request but, for a moment, you can see how lonely his current position is.";
	text2 = "_The tales told about me are true. Mostly. I was a student of Shaping on the Ashen Isles when the rebellion began. I fought the enemy there until I saw the cause was lost._";
	text3 = "_Then I found a way back to the mainland and joined up with the Shaper army._";

begintalknode 46;
	state = 30;
	nextstate = 45;
	condition = gf(42,1) > 1 && gf(42,12) == 1;
	question = "I would like to know more about my mission.";
	text1 = "_It should not be difficult. Cross the forts of the line. When they see your amulet, they will let you pass._";
	text2 = "_Cross the wasteland to the east and enter Gazaki-Uss. Find out what Ghaldring wants. Gather information. Return._";

begintalknode 47;
	state = 30;
	nextstate = -1;
	condition = gf(42,1) > 1 && gf(42,12) != 2;
	question = "Is it possible to get training and supplies?";
	text1 = "_Since you are aiding me, I will send word to the sages in the southern building. If you can convince them to train you, I will allow it._";
	text2 = "_Even though you are a servile, I will allow a rare exception in your case. I will ignore that shortcoming if it leads me to gain an advantage in this war._";
	code =
		if (creature_type(pc_num()) != 46) 
			rs(2);
	break;

begintalknode 48;
	state = 30;
	nextstate = -1;
	condition = gf(42,1) > 1 && gf(42,12) < 2;
	question = "I am eager to aid the Shapers in their struggle.";
	text1 = "_Your enthusiasm is admirable. If you do well enough in your current quest, other opportunities may open up to you._";

begintalknode 49;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "How did you rearrange your forces?";
	text1 = "_My predecessor was the standard old variety of Shaper. He believed in the old ways and the old creations. I introduced the new varieties, like war tralls and wingbolts, into our forces._";
	text2 = "_This, combined with purging the less reliable and less well-controlled creations from the forces, made a huge difference._";

begintalknode 50;
	state = 37;
	nextstate = -1;
	condition = 1;
	question = "What did you do with the forts?";
	text1 = "_I established the line. The three forts in the eastern mountains were given all the resources they needed to keep the enemy back._";
	text2 = "_I completely replaced the forces there, removing the old, weak, demoralized soldiers and creations. Who were riddled with spies, no doubt. And I made it clear that retreat and failure would be punished. Severely._";
	text3 = "_Conditions improved. Now it has been a good while since any enemy troops penetrated the line._";
	text4 = "_Of course, the enemy has penetrated the line again. This is a grim setback, but we will tolerate any number of losses to correct it._";
	code =
		if (gf(100,15) > 1)
			rs(3);
			else rs(4);
	break;
	
begintalknode 51;
	state = 37;
	nextstate = 38;
	condition = 1;
	question = "How do you apply Shaper law?";
	text1 = "_There is no mystery here. I apply it as written. Firmly. All exceptions must be approved by me personally, and it does not happen often._";
	text2 = "_Under the force we have experienced, some Shapers have broken. Not me. The law will carry us through to victory._";

	
begintalknode 52;
	state = 38;
	nextstate = -1;
	condition = 1;
	question = "How did the Shapers break?";
	text1 = "_They advised surrender. Capitulation. Letting the rebels have their land. Suffering rogues to live. Letting any mad creature practice our skills._";
	text2 = "He is becoming agitated. His face grows beet red. _They were weak. They went without true opposition for too long. They need to be reminded what a true Shaper is!_";
	text3 = "With effort, he calms himself down.";
	
begintalknode 53;
	state = 38;
	nextstate = 39;
	condition = 1;
	question = "What laws were being broken?";
	text1 = "_All of them, by the rebels. There is no wise principle of ours, that they have not rejected. They release plagues of creations that reproduce. These eat our crops and attack innocent serviles and outsiders._";
	text2 = "_This is why the Shapers kept such tight control on our arts. If outsiders use them, such disasters are inevitable._";
	text3 = "_We will destroy the rebels. Then we will regain our control. Our secrets can only be kept by those with the strength to use them wisely. We did it for centuries. We will do it again._";
	
begintalknode 54; // pro shaper
	state = 39;
	nextstate = -1;
	condition = get_flag(42,13) == 0;
	question = "It will be difficult, but that is the only way to truly ensure peace.";
	text1 = "He nods. _The Shapers brought peace and wealth for centuries. We can do it again. If we are strong enough._";	
	action = SET_SDF 42 13 1;
	code = 
		inc_flag(100,0,3);
	break;

begintalknode 55; // anti shaper
	state = 39;
	nextstate = -1;
	condition = get_flag(42,13) == 0;
	question = "It is not possible. The secrets will always escape eventually.";
	text1 = "_This is not the first time I have heard the counsel of weakness. Do not let your will be shaken! The Shapers brought peace and wealth for centuries. We can do it again. If we are strong enough._";
	action = SET_SDF 42 13 1;
	code = 
		inc_flag(100,0,-3);
	break;
	
begintalknode 56;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "What happened then?";
	text1 = "_I excelled. I rose through the ranks in eastern Terrestia, marking each promotion with a new slaughter of rebels and rogues. I ascended to my current rank swiftly, aided by the tragic and frequent deaths of my superiors._";
	text2 = "He waves weakly at his ruined body. _And then I was converted to my current ruined status. You are no doubt curious how._";
	
begintalknode 57;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Did you win many victories?";
	text1 = "_Not at first, but later. We were on the cusp of breaking the rebellion when the Unbound were unleashed. An event I was very close to._";
	
begintalknode 58;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "How were you injured?";
	text1 = "_Injured?_ He coughs. It is quite painful for him. He anaesthetizes the discomfort with more wine. _I gained information. About the Unbound being completed, in a distant drakon fortress._";
	text2 = "_I led a raid there, assisted by Agent Miranda. A true hero of the Shapers._";
	text3 = "_We failed in our assault. We were attacked and defeated. I was left for dead, but I managed to escape._";

begintalknode 59;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "And they completed the Unbound?";
	text1 = "_Only a day after our failed assault. If only we had succeeded._";

begintalknode 60;
	state = 42;
	nextstate = -1;
	condition = 1;
	question = "Who was Agent Miranda?";
	text1 = "_My right hand. We were never ... attached, but we were closer than man and wife. She died, at the claws of a drakon. I am reduced to this._";
	text2 = "_That is justice in this world._";

begintalknode 61;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "How did you live?";
	text1 = "_My body was ruined, but I used raw power and essence to hold me to life. The drakons and their craven servants, in their arrogance, thought me dead._";
	text2 = "_With my fading power, I made a cryoa. It dragged me to the icy sea. At that point, Shapers controlled the seas. A Guardian on a ship sensed my presence. It was dumb luck that allowed me to live._";

begintalknode 62;
	state = 43;
	nextstate = 30;
	condition = 1;
	question = "And you rose to the Council?";
	text1 = "_At this point, none doubted my skill or my dedication. I wanted to die. They forced me to serve. High Councilor Shima thought that I could do good here. He was, as he often is, correct._";
	text2 = "_And I have said enough. My babble is a sign of weakness. We must return to the discussion of weighty matters. Then I must return to work._";

begintalknode 63;
	state = 45;
	nextstate = -1;
	condition = 1;
	question = "What should I know about the wastes?";
	text1 = "_It is swarming with creations. Some made by us, some by the enemy. Constantly wandering and attacking each other._";
	text2 = "_Ours tend to control the roads and the rogues are everywhere else. Our creations are trained to not attack anyone wearing that amulet._";
	text3 = "_If you stay on what is left of the roads and avoid the rebel creations, you might have an easy journey. It would still be wise to ask for current conditions in the mountain forts before you cross the line._";

begintalknode 64;
	state = 45;
	nextstate = -1;
	condition = 1;
	question = "What do you know about Ghaldring?";
	text1 = "_He is the leader of the drakons. One of the oldest and more powerful of their kind. And yet, we know little about him._";
	text2 = "_He is said to be incredibly cunning, and he has the political skill to hold together creatures as arrogant and unstable as the drakons._";
	text3 = "_When we kill him, it will be one of the great victories of this war._";
	
begintalknode 65;
	state = 45;
	nextstate = -1;
	condition = 1;
	question = "What sort of information do you want?";
	text1 = "_Anything you can obtain without getting yourself killed. Don't wander too much. Don't enrage the drakons. We know so little about Gazaki-Uss that anything would be a huge help._";

begintalknode 66;
	state = 45;
	nextstate = -1;
	condition = 1;
	question = "What does Gazaki-Uss mean?";
	text1 = "_The drakons have developed their own crude speech. They use it amongst themselves. 'Uss' means fortress. 'Gazaki' means, roughly, a younger 'Gazak.'_";
	text2 = "_I don't know what 'Gazak' means._";

begintalknode 67;
	state = 30;
	nextstate = 46;
	condition = gf(42,12) == 1 && gf(60,1) > 0;
	question = "I have returned from Gazaki-Uss.";
	text1 = "Alwan eagerly leans forward, as far as the metal frame allows him. _And what is Ghaldring's offer to me?_";
	text2 = "You describe the drakon's offer. Alwan shakes his head. _The expected nonsense. Ghaldring does not want peace. He wants five years to experiment, to create a newer, stronger type of Unbound._";
	text3 = "_And he wants to show the world that Shaper rule is not lasting. A useless offer. I would reject it coming from a human or a servile. From a drakon, I trust it even less._";
	text4 = "_Now for the true purpose of your quest. Describe Gazaki-Uss to me. Omit no detail._";
	
begintalknode 68;
	state = 46;
	nextstate = 30;
	condition = 1;
	question = "(Describe Gazaki-Uss honestly.)";
	text1 = "You describe Gazaki-Uss honestly and in great detail. A nearby servile takes notes about your comments.";
	text2 = "You also describe the drakon's laboratory. Alwan is pleased by this extra information. _You have earned a larger reward._";
	text3 = "When you are done, Alwan says, _I said we know nothing about Gazaki-Uss. This was not the truth. We did know a little, and what you say corresponds with it._";
	text4 = "You are brought a large bag of coins and an enchanted girdle. _The Shapers reward those who aid them properly._";
	text5 = "For the additional information, you also receive a pair of shining gemstones.";
	text6 = "_I could do much with a servant like you. You have made an ally in me. If you, with my help, continue to aid the Shapers, you can go very far._";
	code = 
		set_flag(42,12,3);
		toggle_quest(12,3);
		award_party_xp(200,28);
		reward_give(178);
		inc_flag(100,0,3);
		
		if (gf(60,2) == 0) {
			rs(2); rs(5);
			change_coins(750);
			}
			else {
				reward_give(390);
				reward_give(391);
				change_coins(1000);
				}
	break;		

begintalknode 69;
	state = 46;
	nextstate = 30;
	condition = get_stat(20) < 10;
	question = "(Give Alwan false information.)";
	text1 = "You describe Gazaki-Uss, weaving a tissue of lies and misdirection. A nearby servile takes notes about your comments. You are as convincing as you can possibly manage. Any Shaper assault based on your description will have real problems.";
	text3 = "When you are done, Alwan says, _I said we know nothing about Gazaki-Uss. This was not the truth. We did know a little, and what you say does not match it._";
	text4 = "_I am harsh, but I am just. I suspect that you are trying to mislead me, but I have no proof. I will let you go, but you do not have my trust._";
	text5 = "You are brought a small pouch of coins and sent on your way.";
	action = END_TALK;
	
	code = 
		set_flag(42,12,2);
		toggle_quest(12,3);
		award_party_xp(100,28);
		inc_flag(100,0,-3);
		change_coins(100);
	break;		

begintalknode 70;
	state = 46;
	nextstate = 30;
	condition = get_stat(20) >= 10;
	question = "(Give Alwan false information.)";
	text1 = "You describe Gazaki-Uss, weaving a tissue of lies and misdirection. A nearby servile takes notes about your comments. You are as convincing as you can possibly manage. Any Shaper assault based on your description will have real problems.";
	text3 = "When you are done, Alwan says, _I said we know nothing about Gazaki-Uss. This was not the truth. We did know a little, and what you say does not match it. However, I do believe you. Our old information must be false._";
	text4 = "You are brought a large bag of coins and an enchanted girdle. _The Shapers reward those who aid them properly._";
	text6 = "_I could do much with a servant like you. You have made an ally in me. If you, with my help, continue to aid the Shapers, you can go very far._";
	code = 
		set_flag(42,12,3);
		toggle_quest(12,3);
		award_party_xp(200,28);
		reward_give(178);
		inc_flag(100,0,-3);
		change_coins(750);

	break;		

begintalknode 71;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 2;
	question = "I would like to fight for the Shapers.";
	text1 = "_I have already said that I do not trust you. That has not changed. Leave me._";
	action = END_TALK;
	
begintalknode 72;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 3 && (gf(100,0) + get_stat(20) / 2 < 103);
	question = "I would like to fight for the Shapers.";
	text1 = "_You seem like a competent ally. However, your words about the war and the Shapers have filled me with doubt. Do more to prove yourself to us, and you might gain our trust._";
	text2 = "_That is all. I dismiss you._";
	action = END_TALK;

begintalknode 73;
	state = 30;
	nextstate = 47;
	condition = (gf(42,12) == 3 || gf(42,12) == 4) && (gf(100,0) + get_stat(20) / 2 >= 103);
	question = "I would like to fight for the Shapers.";
	text1 = "General Alwan nods. _You are not most Shapers' idea of an ideal ally. However, you have proven yourself, and I think you deserve a chance to aid us._";
	text2 = "_First, however, I would like one more demonstration of your skill and loyalty. As you saw, our control of the creations in the wastes east of the line is imperfect. This must be repaired._";
	text3 = "_Many of those creations are directed by servant minds, in a place called Control Core B. I sent one of my assistants there, Guardian Koerner. The Guardian who helped to create the place. He has not returned._";
	text4 = "_Go there. Speak with the minds. Discover the nature of the problem, and correct it._";
	code = 
		set_flag(42,12,4);
		toggle_quest(13,1);
	break;	
	
begintalknode 74;
	state = 47;
	nextstate = -1;
	condition = 1;
	question = "Where is Control Core B?";
	text1 = "_It is under the river south of Fort Rockfall. Travel along the shore until you find a semi-circle of pillars. The entrance is concealed inside it._";
	text2 = "_It is a hidden location, but close enough to the wastelands that creations can be controlled from there._";
	code =
		sf(50,1,1);
	break;
	
begintalknode 75;
	state = 47;
	nextstate = -1;
	condition = 1;
	question = "The servant minds control the creations?";
	text1 = "_Not entirely. The creations are given instructions when made and follow them. The servant minds just give ... calming reinforcement. A sense of well being._";

begintalknode 76;
	state = 47;
	nextstate = -1;
	condition = 1;
	question = "What do you think is wrong there?";
	text1 = "_I would not guess. I do not have enough information. There are so many possible problems. I will have to trust to your ingenuity._";
	text2 = "_If you would like to learn more about the place, speak with Shaper Marzan. He created the minds there._";
	
begintalknode 77;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 4 && gf(100,19) == 1;
	question = "Control Core B has been repaired.";
	text1 = "You tell Alwan what happened. _A horrible mess. And a tragic loss._";
	text2 = "_Such a shame about Guardian Koerner. He was a friend of mine. We served together in eastern Terrestia. Still, it sounds like he suffered the consequences of breaking our laws._";
	text3 = "_You have done well. I feel that I can place my trust in you. I could use you as a servant. With your help, I think I might finally turn the course of this war._";
	text4 = "A servant brings you a newly made wand and a sack of silver coins.";
	code = 
		if (gf(52,22) == 0)
			rs(2);
		set_flag(42,12,5);
		toggle_quest(13,3);
		award_party_xp(200,28);
		change_coins(500);
		reward_give(239);
		inc_flag(100,0,3);
	break;	

begintalknode 78;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 4 && gf(100,19) == 2;
	question = "Control Core B has been destroyed.";
	text1 = "You tell Alwan what happened, altering the facts to obscure any treasonous actions on your part. He is furious. His face turns red. His limbs twitch. The crystal conduits glow red.";
	text2 = "Then he manages to calm down. A little. _Get away. Get away from me. My trust in you was misplaced. You are no ally of ours._";
	action = END_TALK;
	code =
		sf(42,12,2);
		toggle_quest(13,3);
	break;

begintalknode 79;
	state = 30;
	nextstate = 50;
	condition = gf(42,12) == 5 && (gf(100,2) == 2 || gf(100,4) == 2 || gf(100,5) == 2 || gf(100,6) == 2);
	question = "I would like to help you win this war.";
	text1 = "_We all wish to end this war. But not all of us have the strength and determination necessary to win it. I could achieve victory, if only the Council would give me full support._";
	text2 = "_I thank you for the help you have given so far. You have been very useful. However, I believe that your loyalty is with another. Renounce those you have sworn to help, and I may be able to trust you fully._";


begintalknode 80;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "I will not do that.";
	text1 = "_Then leave me. You are but one person, and a suspiciously altered one at that. You will not keep me from completing my great work._";
	action = END_TALK;
	
begintalknode 81;
	state = 50;
	nextstate = 51;
	condition = 1;
	question = "I want to renounce my old alliance. I want to serve you.";
	text1 = "_Your words and deeds have shown you to be insufficiently loyal to the Shapers. I could not trust you._";
	text3 = "He looks into your eyes, trying to gauge your sincerity. _Then swear again, on your life. But know this. Betrayal has consequences._";
	text4 = "(If you agree, the faction you agreed to help earlier will turn their backs on you. There is no going back to them. Be sure that this is what you want.)";
	action = DEP_ON_SDF 100 0 100;
	
begintalknode 82;
	state = 51;
	nextstate = -1;
	condition = gf(100,0) >= 100;
	question = "I will not do that.";
	text1 = "_Then leave me. You are but one person, and a suspiciously altered one at that. You will not keep me from completing my great work._";
	action = END_TALK;
	
begintalknode 83;
	state = 51;
	nextstate = 30;
	condition = gf(100,0) >= 100;
	question = "I swear on my life that I want to serve you. I renounce my old alliance.";
	text1 = "You expect something more dramatic. A shock or a bolt of lightning or something. Nothing so spectacular happens. However, you suspect that word of your action will soon filter back to your former master.";
	text2 = "Alwan nods. _You have chosen wisely. I can keep you safe, though I will also make sure there is no going back to where you were before. Now then. Let us discuss our new future._";
	code =
		if (gf(100,2) == 2)
			sf(100,2,3);
		if (gf(100,4) == 2)
			sf(100,4,3);
		if (gf(100,5) == 2)
			sf(100,5,3);
		if (gf(100,6) == 2)
			sf(100,6,3);
	break;

begintalknode 84;
	state = 30;
	nextstate = 52;
	condition = gf(42,12) == 5 && gf(100,2) != 2 && gf(100,4) != 2 && gf(100,5) != 2 && gf(100,6) != 2 && gf(100,3) < 2;
	question = "I would like to help you end the war.";
	text1 = "_We all wish to end this war. But not all of us have the strength and determination necessary to win it. I could achieve victory, if only the Council would give me full support._";
	text2 = "_The war is not lost. The enemy was strong enough to make us doubt the rightness of our cause, our culture. We were too complacent, too overconfident. But this can be changed._";
	text3 = "_Swear to obey me, and I promise that the Shapers can prevail. We will drive the rebels into the sea! The glory days of old can return!_";
	text4 = "(If you agree, you will join Alwan's faction and be on one of the paths to winning the game. You can leave this path later, but not without penalty. Make sure that this is what you want.)";

begintalknode 85;
	state = 52;
	nextstate = -1;
	condition = 1;
	question = "I do not believe that this is possible.";
	text1 = "General Alwan lets out a long, disgusted noise. Flecks of spittle fly out. _Pfaugh! Go! Leave! Travel the world! See the ruin, the madness! When you are ready to choose a side, to struggle to end this ruinous war, return!_";
	text2 = "_We Shapers brought peace and happiness for centuries. We will do so again, with or without you. Leave me._";
	action = END_TALK;

begintalknode 86;
	state = 52;
	nextstate = 53;
	condition = 1;
	question = "I will join you. I swear it.";
	text1 = "The Councilor motions for you to approach. He places a hand on your shoulder. The heat coming from his body is almost painful.";
	text2 = "_Then swear to trust and serve me. Follow my commands. Work to bend the Shaper Council to our will, so that we can finally fight for victory._";

begintalknode 87;
	state = 53;
	nextstate = -1;
	condition = 1;
	question = "I'm still not sure.";
	text1 = "General Alwan looks exasperated. _Have you not seen enough of this world to understand? Something must be done. Oh, just go away. Return when you are ready to pick a side._";
	action = END_TALK;

begintalknode 88;
	state = 53;
	nextstate = 30;
	condition = 1;
	question = "I so swear.";
	text1 = "_And I swear to aid you in your struggle and reward you for your successes. I am pleased to have a new ally, a cunning and dangerous infiltrator._";
	text2 = "_I will unlock the door to my library. Take anything you find that seems useful. Also, if you can prove yourself, I will instruct my sages to teach you more advanced magic and Shaping._";
	text3 = "_Now that there is hope, I am eager to begin. Let us discuss your first mission. There is an obstacle we need to remove. It is the Unbound. That wretch Rawal holds the key. We must obtain it._";
	code =
		sf(100,3,2);
		award_party_xp(250,20);
	break;

begintalknode 89;
	state = 30;
	nextstate = 55;
	condition = (gf(42,12) == 5 || gf(42,12) == 6) && gf(100,3) == 2;
	question = "What do I need to obtain from Rawal?";
	text1 = "_I need to convince the Shaper Council that victory is possible, if they only give me their full support. To do this, I must free them of their fear of the enemy's greatest shock troops, the Unbound._";
	text2 = "_I think that my Shapers can develop a weapon against these creatures, but I must first obtain a certain sample of their flesh. It was from an Unbound that was found dead on a road near Hatra. It died of disease._";
	text3 = "_However, I made the mistake of placing it in Rawal's control, in the Foundry Repository. Now you need to get it for me._";
	code =
		sf(42,12,6);
		toggle_quest(14,1);
	break;

begintalknode 90;
	state = 55;
	nextstate = -1;
	condition = 1;
	question = "Tell me about Rawal.";
	text1 = "_You have seen enough, I think, to see what a craven and self-interested wretch he is. He has even abused his duty in controlling the Repository, holding the contents placed in his trust and using them to gain leverage over the Council._";
	text2 = "_He is my peer, so I would not act directly against him. But I do loathe him._";

begintalknode 91;
	state = 55;
	nextstate = -1;
	condition = 1;
	question = "How will I do that?";
	text1 = "_You must return to the Whitespires and find the Foundry Repository. Sneak in. Avoid Rawal if you can._";
	text2 = "He removes a key from one of the pouches hanging from the framework that supports him. _This key will let you into my vault._";
	text3 = "_Sneak into the repository. Find my vault, recover the sample, and bring it to me._";
	code = 
		if (has_spec_item(41))
			rs(2);
			else set_spec_item(41,1);
	break;	

begintalknode 92;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 6 && has_spec_item(35);
	question = "I found the Unbound sample. (Give it to him.)";
	text1 = "He takes the sample and looks at it. He holds up the grisly trophy to the light. You can make out the black blotches on the flesh. Now that your attention is drawn to it, they do look oddly diseased.";
	text2 = "_This may lead us to a way to weaken the Unbound. You have done well. Even though, if Rawal had a sense of duty, he would have surrendered it as soon as I asked._";
	text3 = "A bounty is brought to you: A pouch of gold coins, a cloak, and a polished crystal. _That cloak served me well in battle, when I was back in the field. I hope it protects you as well._";
	text4 = "_Rawal will come to support me once he sees that I have enough votes on the Council. Now we must turn our attention to Astoria._";
	code = 
		set_spec_item(35,-1);
		set_flag(42,12,7);
		toggle_quest(14,3);
		award_party_xp(200,28);
		reward_give(22);
		reward_give(390);
		change_coins(500);
	break;		
	
begintalknode 93;
	state = 30;
	nextstate = 57;
	condition = (gf(42,12) == 7 || gf(42,12) == 8) && gf(100,3) == 2;
	question = "What needs to be done about Astoria?";
	text1 = "_More than any other on the Council, my colleague Astoria believes that we need a peaceful end to this war. 'Peaceful end' is what she calls it. I have a different name. Surrender. She needs to be discredited._";
	text2 = "_It is a well-known secret that she is allowing rogue serviles to be ferried through the Mera-Tev using something called the Shadow Road. This is a minor offense._";
	text3 = "_However, serviles we have questioned have indicated that the drakons have created a secret base in the Shadow Road. To allow something like this to fester in her lands would cause Astoria to lose support in the Council._";
	text4 = "_Enter the Shadow Road. Find that secret base. Discover what is being created there._";
	code =
		sf(42,12,8);
		toggle_quest(15,1);
	break;

begintalknode 94;
	state = 57;
	nextstate = -1;
	condition = 1;
	question = "How did you get the information out of the servile?";
	text1 = "_I had it brought before me. I exercised my will. It could not resist the influence of a Shaper of my power. After that, it told us all willingly._";
	text2 = "_I am not without mercy. The creature still lives. It's in a crystal mine somewhere. Waste not, want not._";

begintalknode 95;
	state = 57;
	nextstate = -1;
	condition = 1;
	question = "How should I best enter the Shadow Road?";
	text1 = "_It doesn't matter how you enter, as long as you find a way to pass any defenses and reach the center._";
	text2 = "_If you don't know how to enter the Shadow Road, any servile colonies in the Mera-Tev are good places to begin your hunt._";

begintalknode 96;
	state = 57;
	nextstate = -1;
	condition = 1;
	question = "What should I do about the base itself?";
	text1 = "_Part of me is tempted to tell you to let it survive. Pay Astoria back for her laxity. But that would be petty._ He starts to involuntarily shudder. He takes a long swig of wine and waits to calm down.";
	text2 = "_If you can, destroy the outpost. It is not necessary, but it would be preferable._";

begintalknode 97;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 8 && gf(100,13) > 0;
	question = "The reports are true. There was a drakon outpost in the Shadow Road.";
	text1 = "You describe the drakon base to General Alwan. He is surprisingly unconcerned by your actions there. He just wants enough information to be able to embarrass Astoria before the Council.";
	text2 = "_She was my main opponent in the debate. Now that she has been shown to be naive and a fool, my position will look much better. I will get the resources I need!_";
	text3 = "A bounty is brought to you: A pouch of gold coins, a ring, and a polished crystal. _That ring protected me when I battled my foes; when I was capable of that sort of thing. I hope it protects you as well._";
	text4 = "_The next meeting of the Council approaches. Our research on the Unbound sample proceeds. However, I have learned that another member of the Council has embarked on a project. A mad, dangerous ..._ He shakes his head.";
	text5 = "_Something must be done. Not just the war, but the honor of the Shapers is at stake._";
	code = 
		set_flag(42,12,9);
		toggle_quest(15,3);
		award_party_xp(200,28);
		reward_give(341);
		reward_give(390);
		change_coins(750);
	break;		

begintalknode 98;
	state = 30;
	nextstate = 58;
	condition = (gf(42,12) == 9 || gf(42,12) == 10) && gf(100,3) == 2;
	question = "What do I need to do before the Council meets?";
	text1 = "_You must travel south to the Dera Reaches. It is ruled by Sage Taygen, who we now know is the maddest of the members of the Council. He wants to create a disease which will slay all creations._";
	text2 = "_He wants the Shapers to start over. And, though he is mad, he is also brilliant. I believe that he can succeed._";
	text3 = "_His work is taking place in Kayar's Spire, in the most remote, barren extent of that desert. Find a way to get there and sabotage his work. Once he has lost hope, I think that I can bring him around to our cause._";
	code =
		sf(42,12,10);
		toggle_quest(11,1);
	break;

begintalknode 99;
	state = 58;
	nextstate = -1;
	condition = 1;
	question = "Can't I just kill Taygen?";
	text1 = "_You will do no such thing. If you harm a member of the Council, I am bound by honor to destroy you. I will not hesitate._";

begintalknode 100;
	state = 58;
	nextstate = -1;
	condition = 1;
	question = "How can I get to Kayar's Spire?";
	text1 = "_It will be difficult. You will need to avoid Sage Taygen. He is aware of how the other Council members will react to news of his work. I think he hopes to complete and release the disease before he can be stopped._";
	text2 = "_Completing the Agent will be delicate work. Delicate enough that it should be easy to sabotage it. It must be done though, and quickly._";

begintalknode 101;
	state = 58;
	nextstate = -1;
	condition = 1;
	question = "Why do you oppose this? Don't the Shapers claim total dominion over their creation?";
	text1 = "_You do not understand us at all. Our creations are our children. We control them. We discipline them. But we love them._";
	text2 = "_We cannot destroy the loyal creations. That would be a rejection of all we believe. It would be a smudge on the honor of the Shapers that could never be forgiven._";

begintalknode 102;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 10 && (gf(100,17) > 0 || gf(100,21) > 0);
	question = "I have succeeded. The Purity Agent will not be created.";
	text1 = "_Then you have done very well. All is in place. The Council is adrift, waiting for a strong voice to guide it. Someone needs to provide them with a clear path to follow. It will be me._";
	text2 = "_Astoria will not oppose me. She knows what I know. The weak, western Councilors will accept my assurances that I can protect them from the Unbound. And Rawal will go whatever way the wind blows._";
	text3 = "Your reward is brought to you: A heavy pouch of gold coins, a pair of gauntlets, and a polished crystal. _I wore those gauntlets once. I will miss them. I hope that they aid you._";
	text4 = "_Our journey will have one final step. We must deal with the Council itself._";
	code = 
		set_flag(42,12,11);
		toggle_quest(11,3);
		award_party_xp(200,28);
		reward_give(476);
		reward_give(394);
		change_coins(1000);
	break;		

begintalknode 103;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) == 11 || gf(42,12) == 12;
	question = "Where should I go now?";
	text1 = "_I am about to leave this place. I am going to the Shaper Citadel. Our annual meeting is close. All members of the Council will depart for there very soon. Once the Council meets, I will present my case._";
	text2 = "_I know what you are thinking. I can be separated from this accursed machinery for stretches of time. It is difficult and painful, but I must go to the Council in person._";
	text3 = "_You must travel to the Council hall as well, in the Shaper Citadel. The path up to it is at the northwest corner of the Storm Plains. I will send word that you are to be let in._";
	text4 = "_I want you to be present when I make my argument. This is important. Go there soon. Do not disappoint me._";
	code = 
		set_flag(42,12,12);
		toggle_quest(24,1);
		sf(100,18,1);
		sf(100,16,1);
	break;

begintalknode 104;
	state = 30;
	nextstate = -1;
	condition = gf(100,3) == 3 && gf(42,12) != 2;
	question = "I am no longer your servant.";
	text1 = "General Alwan nods. _I heard rumors. It is to your credit that you came and told me directly, instead of just skulking away._";
	text2 = "_However, you betrayed me. I will not seek revenge, but you are no longer welcome here. You will receive no aid. Leave this place._";
	action = END_TALK;
	code =
		sf(42,12,2);
	break;

begintalknode 105;
	state = 30;
	nextstate = -1;
	condition = gf(100,3) == 2 && gf(100,8) == 0;
	question = "I need help dealing with this control tool.";
	text1 = "Alwan says, _So it is true. You are one of Rawal's victims. One day, I will challenge him before the Council for the abominations he has created. When the time is right._";
	text2 = "_For now, speak with Shaper Marzan. He might be able to help you with that problem._";

begintalknode 106;
	state = 30;
	nextstate = -1;
	condition = gf(34,9) == 7 && gf(100,19) == 2 && gf(42,12) < 2 && gf(100,6) == 2;
	question = "I want to talk to you about the Shaping arts.";
	text1 = "Alwan is suspicious. _I have been known to banter about philosophy, but only with those who have earned my time. By, for example, aiding me in this Gazaki-Uss matter._";
	text2 = "";

begintalknode 107;
	state = 30;
	nextstate = 60;
	condition = gf(34,9) == 7 && gf(100,19) == 2 && gf(42,12) >= 2 && gf(100,20) == 0 && gf(100,6) == 2;
	question = "I want to talk to you about the Shaping arts.";
	text1 = "Alwan looks wary. _I suppose you have earned a moment of my time, though I am too busy to banter about philosophy. What are you referring to?_";

begintalknode 108;
	state = 60;
	nextstate = 61;
	condition = 1;
	question = "Have you had problems with Control Core B?";
	text1 = "Alwan now looks very suspicious. _I am sure that you know that we have. It is not widely known, but it happens._";
	text2 = "_The creations under my control have turned on their masters. They are doing some harm. However, they will soon be destroyed and then replaced._";
	text3 = "_But, I wonder. Why do you ask about this?_ His unblinking gaze starts to make you nervous.";

begintalknode 109;
	state = 61;
	nextstate = -1;
	condition = 1;
	question = "No reason. Never mind.";
	text1 = "_I see. This conversation wasted my time. Leave me. We must plan the next stage of the war._";
	action = END_TALK;

begintalknode 110;
	state = 61;
	nextstate = 62;
	condition = 1;
	question = "So relying on your creations has not been helpful?";
	text1 = "General Alwan's face betrays no emotion. He watches you coldly. _You had best be careful. That sounds close to Trakovite talk. We kill Trakovites._";
	text2 = "_I know what you expect me to think. Such thoughts are tempting, but they are wrong._";

begintalknode 111;
	state = 62;
	nextstate = -1;
	condition = 1;
	question = "What do you mean?";
	text1 = "_The rebels rely on the power of creations. Therefore, to match them, we need creations as well. That makes having creations like riding a bear. The beast may bear us, but it might also throw and devour us._";
	text2 = "_I will not deny that I have been upset by what has happened. Greatly. But that will pass, and we will then march undeterred toward victory._";
	text3 = "_Now, if you are wise, you will leave me before I further entertain suspicions about what happened to Control Core B._";
	text4 = "You take his advice. There is nothing more you can do here. General Alwan's faith in Shaping cannot be shaken. At least, not at this point.";
	action = END_TALK;
	code =
		sf(100,20,1);
	break;

		
begintalknode 112;
	state = 30;
	nextstate = -1;
	condition = gf(42,12) > 1 && has_spec_item(20) == 0;
	question = "I would like permission to travel beyond the Storm Plains.";
	text1 = "General Alwan thinks about this. Then he calls for a servant to bring pen and paper. With one hand, he scrawls out a pass. The servant hands it to you.";
	text2 = "_Rawal's papers, technically, allow you free passage. I have delayed you longer than our rules permit. I prefer to keep the borders between my lands and those of that madman Taygen closed, but ..._";
	text3 = "He waves his hand in a resigned gesture.";
	code =
		set_spec_item(20,1);
	break;

begintalknode 113;
	state = 30;
	nextstate = -1;
	condition = gf(100,5) == 2;
	question = "I answer to Ghaldring now. Die, warped creature! (Attack.)";
	text1 = "General Alwan is not at all surprised. _I only tried to recruit you because I thought that you had the potential to be a useful tool. I am relieved that you have shown your true nature. Now I can destroy you with a clear mind._";
	action = END_TALK;
	code =
		sf(41,3,1);
		make_zone_hostile();
	break;
	
// Sage Pavyl

begintalknode 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = "You meet one of the mages of Stormhold. Although she is an outsider, she clearly has some influence here. Her robes are made of silk, impeccably tailored.";
	text2 = "She says, _Greetings to you. I am Sage Pavyl. I was informed that we might have a valued outsider as a visitor. Please be sure to ask me if you need any aid. I will give you all assistance the Shapers allow._";
	text5 = "Sage Pavyl says, _Do you need more assistance? I seem to have a moment. I can give you all the help the Shapers allow._";
	action = INTRO;

begintalknode 131;
	state = 130;
	nextstate = 131;
	condition = 1;
	question = "What do you do here in Stormhold?";
	text1 = "_I am well-trained as a mage. The Shapers have been very generous in what they allow me to learn. In return, I teach spells to the younger prospectives and help with all laboratory work that does not require manipulation of essence._";
	
begintalknode 132;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "But you are not a Shaper.";
	text1 = "_Sadly, no. I was only a prospective. The trials to become a Shaper are very difficult, and I was not adequate. Still, the Shapers recognized my small talents and allowed me to learn an unusual amount of magic for an outsider._";
	text2 = "_I am very grateful._";

begintalknode 133;
	state = 131;
	nextstate = -1;
	condition = 1;
	question = "What is a prospective?";
	text1 = "_A young person who has shown him or herself to have the talent and control to become a Shaper. That person receives much training and testing._";
	text2 = "_Survival is rewarded with Shaperdom._";
	
begintalknode 134;
	state = 130;
	nextstate = 132;
	condition = 1;
	question = "You will help me as much as allowed?";
	text1 = "_Of course. My main purpose here is to teach magic. It is illegal to learn any magic, even a single spell, without specific permission from the Shapers._";
	text2 = "_This is only just and reasonable, of course. Controlling who holds power is one of the cornerstones of the Shaper philosophy. One must only look at our ruined lands to see the wisdom of it._";
	text3 = "_I am pleased to say that I have gained so much trust from the Shapers that I can advise them about what outsiders should gain power._";
	
begintalknode 135;
	state = 132;
	nextstate = -1;
	condition = 1;
	question = "And this is thought to be just?";
	text1 = "_By loyal people, yes. Traitors and rebels, of course, always have excuses for why they should be able to lack self-control._";
	
begintalknode 136;
	state = 132;
	nextstate = -1;
	condition = 1;
	question = "Why have you been given so much power?";
	text1 = "_A combination of my skill and my loyalty. And, of course, the limitless generosity of the Shapers._";
	
begintalknode 137;
	state = 132;
	nextstate = 133;
	condition = 1;
	question = "You evaluate your fellow outsiders?";
	text1 = "_I do. The Shapers trust me, and they understand that sometimes they don't understand outsiders as well as they might. I have better insight into the outsider mind._";
	text2 = "_This reminds me. I had heard that you might be going to the line. If you pass through the mountain forts, I need a message delivered. An outsider petition for more training._";
	text3 = "_If you are going there anyway, could you deliver it for me?_";
	code =
		if ((gf(42,20) > 1) || (gf(48,2) > 0)) {
			rs(2); rs(3);
			}
	break;
	
begintalknode 138;
	state = 133;
	nextstate = 130;
	condition = gf(42,20) == 0 && gf(48,2) == 0;
	question = "I'm fairly busy.";
	text1 = "_I understand completely._";
	
begintalknode 139;
	state = 133;
	nextstate = -1;
	condition = gf(42,20) < 2 && gf(48,2) == 0;
	question = "I can help you.";
	text1 = "_Excellent. The message is for Cyprien. She is a battle mage in Fort Vengeance, the middle fort in the line._";
	text2 = "She hands you a scroll, sealed with wax.";
	text3 = "_She is ... temperamental. Easy to anger. I would simply deliver the scroll and leave quickly._";
	code =
		if (gf(42,20) > 0)
			rs(2);
		sf(42,20,1);
		toggle_quest(79,1);
	break;
	
begintalknode 140;
	state = 130;
	nextstate = -1;
	condition = gf(100,3) == 3;
	question = "Can you teach me some magic?";
	text1 = "_General Alwan has been very clear. We are no longer to aid you._";
	
begintalknode 141;
	state = 130;
	nextstate = -1;
	condition = gf(42,12) == 0;
	question = "Can you teach me some magic?";
	text1 = "_I will, if General Alwan sends word that I can. Of course, he is more likely to do that if you made yourself useful to him in some way._";
	
begintalknode 142;
	state = 130;
	nextstate = 135;
	condition = gf(42,12) > 0 && gf(100,3) < 3;
	question = "Can you teach me some magic?";
	text1 = "_General Alwan has sent word that you are currently of use to him, and that I can expand your knowledge of the magical arts._";
	text2 = "_In fact, he recently dramatically expanded the set of spells I can teach you._";
	text3 = "_If you aid him farther, you should return and speak with me. He might always decide to expand the range of spells I can teach you._";
	code =
		if (gf(42,12) < 10)
			rs(2);
			else rs(3);
	break;
	
begintalknode 143;
	state = 135;
	nextstate = -1;
	condition = 1;
	question = "I would like to learn spells.";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Sage Pavyl",
		  "Sage Pavyl has been given permission to teach you several magical spells.",
		  43,5,0);	
	break;
	
begintalknode 144;
	state = 135;
	nextstate = -1;
	condition = gf(100,3) == 2;
	question = "I would like skill training.";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Sage Pavyl",
		  "Sage Pavyl has been given permission to improve your magical skills. You can only improve skills you have not already trained in two times.",
		  44,4,0);	
	break;
	
begintalknode 145;
	state = 135;
	nextstate = -1;
	condition = gf(42,12) >= 10;
	question = "I would like to learn advanced spells.";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Sage Pavyl",
		  "Sage Pavyl has been given permission to teach you advanced magical spells.",
		  45,3,0);	
	break;
	
begintalknode 146;
	state = 135;
	nextstate = 130;
	condition = 1;
	question = "I would like to discuss something else.";
	text1 = "_Of course._";
	
begintalknode 147;
	state = 130;
	nextstate = -1;
	condition = gf(42,20) == 1 && gf(48,2) > 0;
	question = "I delivered your message.";
	text1 = "_And, no doubt, Cyprien did not give you the payment you were owed. As I said in the message. Too hot a temper. Not to be trusted with more power._";
	text2 = "She fetches some crystals and pouches of spores for you. _Hopefully, this will justify the time you spent._";
	code = 
		set_flag(42,20,2);
		toggle_quest(79,3);
		award_party_xp(150,28);
		reward_give(232);
		reward_give(237);
		reward_give(121);
		reward_give(122);
	break;		
	
	
// Shaper Marzan

begintalknode 150;
	state = -1;
	nextstate = 150;
	condition = 1;
	question = "Name";
	text1 = "To be a Shaper is a great mental burden. For most people, simply getting through their own lives day to day is a struggle. This Shaper must not only guide himself but all the living creatures he controls.";
	text2 = "After years of war, he seems to be slightly bending under the pressure. He walks among the massive crystals, guiding and advising the younger Shapers. He occasionally stands at a crystal and sends commands to his own forces.";
	text3 = "He is not so distracted, however, that he can't take time to deal with an outsider in his domain. _You, there. Stop. Let me see you._ He walks up, leans close, and looks at your face. _Ah, yes. You are allowed. To be here, I mean._";
	text4 = "_I am Shaper Marzan. General Alwan told me to aid you. I can do that. Briefly._";
	text5 = "Shaper Marzan leans oddly close when he talks to you. He must be very nearsighted. He doesn't show as much contempt for you as most Shapers do, but that might just be because he is so distracted.";
	text6 = "_Yes, yes. I can talk briefly. What do you want?_";
	action = INTRO;

begintalknode 151;
	state = 150;
	nextstate = 151;
	condition = 1;
	question = "What are you doing here?";
	text1 = "_We are controlling creations. In the lands around Perikalia. Keeping them secure._";
	
begintalknode 152;
	state = 150;
	nextstate = 153;
	condition = 1;
	question = "How many creations do you control?";
	text1 = "He doesn't pause a moment before responding. _Forty. There was another, but it had to be absorbed last week. It was too wounded._";

begintalknode 153;
	state = 150;
	nextstate = -1;
	condition = gf(100,3) == 3;
	question = "Can you teach me about Shaping?";
	text1 = "_General Alwan has been very clear. We are no longer to aid you._";
	
begintalknode 154;
	state = 150;
	nextstate = -1;
	condition = gf(42,12) == 0;
	question = "Can you teach me about Shaping?";
	text1 = "_I will, if General Alwan sends word that I can. Of course, he is more likely to do that if you made yourself useful to him in some way._";
	
begintalknode 155;
	state = 150;
	nextstate = 155;
	condition = gf(42,12) > 0 && gf(100,3) < 3;
	question = "Can you teach me about Shaping?";
	text1 = "_General Alwan has sent word that you are currently of use to him, and that I can expand your knowledge of the Shaping arts._";
	text2 = "_Most unusual to do that for a servile. Before the war, teaching you would mean I would have to instantly destroy you. Odd times. Odd times._";
	text3 = "_In fact, he recently dramatically expanded the set of creations I can teach you to create._";
	text4 = "_If you aid him farther, you should return and speak with me. He might always decide to expand the range of creations I can teach you to make._";
	code =
		if (creature_type(pc_num()) != 46) 
			rs(2);
		if (gf(42,12) < 10)
			rs(3);
			else rs(4);
	break;
	
begintalknode 156;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "How far away can you control them?";
	text1 = "_The range depends on focus. The focus of the Shaper. I can reach fifty miles. With great effort._";
	text2 = "_When a creation goes too far, it gets worried. It starts to wander. It usually returns home. Sometimes ... Sometimes it goes rogue. We are careful not to let them wander too far._";
	
begintalknode 157;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "Where are the creations made?";
	text1 = "_Here. And here they return. For feeding. And so we can tend to their wounds._";
	
begintalknode 158;
	state = 151;
	nextstate = -1;
	condition = 1;
	question = "Is it difficult to control creations from far away?";
	text1 = "_Yes. Takes great training. Focus. But very powerful. We are in no danger here. We send the creations. If they die, we make more._";
	text2 = "_This makes Shapers very difficult to defeat._";
	
begintalknode 159;
	state = 153;
	nextstate = -1;
	condition = 1;
	question = "How is it possible to control so many?";
	text1 = "_I cannot control each directly all the time, of course. The little attention I pay carries great influence. Leaves them calm. Directed. Unable to go rogue._";
	text2 = "_Doing this takes many years of training. Which you have not had, I think. But, when well-trained, each Shaper is an army._";
	
begintalknode 160;
	state = 155;
	nextstate = -1;
	condition = 1;
	question = "I would like to learn Shaping.";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Shaper Marzan",
		  "Shaper Marzan is able to teach you about Shaping. If sharing these secrets with an outsider bothers him, he doesn't show it.",
		  46,4,0);	
	break;
	
begintalknode 161;
	state = 155;
	nextstate = -1;
	condition = gf(42,12) >= 10;
	question = "I would like to learn advanced Shaping.";
	text1 = "You conclude your training.";	
	code = 
		begin_shop_mode("Shaper Marzan",
		  "Shaper Marzan is able to teach you about Shaping. If sharing these secrets with an outsider bothers him, he doesn't show it.",
		  47,3,0);	
	break;

begintalknode 162;
	state = 155;
	nextstate = 150;
	condition = 1;
	question = "I want to discuss something else.";
	text1 = "_All right._";
	
begintalknode 163;
	state = 150;
	nextstate = 156;
	condition = gf(42,12) == 4;
	question = "General Alwan is sending me to repair Control Core B.";
	text1 = "_I have heard. I hope you succeed. I created Control Core B. And Control Core A before it._";
	text2 = "_Four linked servant minds, reassuring creation forces as they carry out a series of simple instructions. Not good for an assault, but good for holding ground._";
	text3 = "_I hope Alwan told you where it is. South of Fort Rockfall. By the river. Circle of standing stones._";
	code = 
		sf(50,1,1);
	break;
	
begintalknode 164;
	state = 156;
	nextstate = -1;
	condition = 1;
	question = "What happened to Control Core A?";
	text1 = "_We let it go too long unwatched. We let the minds labor too long without rest. One broke. Drove the others rogue._";
	text2 = "_The whole place had to be walled up. Most of the creations had to be absorbed. A real mess. Then General Alwan came and let me recreate the system. But better._";
	text3 = "_Or so I thought._";
	
begintalknode 165;
	state = 156;
	nextstate = 157;
	condition = 1;
	question = "What do you think is wrong with the system?";
	text1 = "He starts to seem more distracted. _I ... I have not thought about it. Some of the creations controlled go rogue. Don't respect the amulets._";
	text2 = "_So, so many things that could be wrong. I would not want to guess._";
	
begintalknode 166;
	state = 157;
	nextstate = 158;
	condition = get_stat(20) >= 5;
	question = "No, really. I need you to guess.";
	text1 = "Your strong words get him to focus for a short time. _Well, if one mind started to go rogue, it could slowly corrupt the others. But the minds are smart. The rogue mind would know to hide it._";
	text2 = "_If this were the problem, we would see what we are seeing now. Breaking the mind's connection with the system would do much to fix the problem._";
	code =
		sf(52,1,3);
	break;
	
begintalknode 167;
	state = 158;
	nextstate = -1;
	condition = 1;
	question = "How would I figure out which mind was rogue?";
	text1 = "_You would have to be clever._";
	
begintalknode 168;
	state = 150;
	nextstate = 160;
	condition = gf(100,3) == 2 && gf(100,8) == 0;
	question = "I have a control tool in my chest.";
	text1 = "Shaper Marzan has you show it to him. He nods. _I have studied these creatures. Alwan saw to that. Shaper Rawal has not improved the design. My knowledge is not out of date. I can remove it._";
	text2 = "_However, it will be difficult. And extremely painful. Are you sure that you want to take the risk? Remember, as long as you stay far from Rawal, he will not be able to control you._";
	
begintalknode 169;
	state = 160;
	nextstate = 150;
	condition = 1;
	question = "Never mind.";
	text1 = "_Perhaps wise. What else do you want to discuss?_";
	
begintalknode 170;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "I am ready. Get this thing out of me.";
	text1 = "Shaper Marzan directs you to a nearby stone table. You lie on it. He restrains you with ropes. _Please try to be calm. This is going to be agonizingly painful._ His bedside manner leaves something to be desired.";
	text2 = "He bares your chest. He extends his withered, bony hand and touches the tool. He concentrates for a moment. The tool lets out a long, shrill squeal. Then it shrivels up.";
	text3 = "It is more or less at this point that the agony starts. You feel as if a massive hand is squeezing your chest. Your life blood leaks out through a tiny hole in your heart.";
	text4 = "But Marzan is prepared. With a smooth motion, he slides the tool out of you, being careful not to leave any bits behind. Then he puts a hand on the hole, concentrates, and Shapes you. The hole in your heart closes. The wound seals up.";
	text5 = "Then he unties you. _You will need some time to recover. I feel fortunate. My subjects usually don't survive that._";
	text6 = "With a contemptuous flip of his hand, he throws the tool into the trash. You feel horribly weak, but you are free.";
	action = END_TALK;
	code =
		sf(100,8,1);
		alter_stat(3,-1);
		award_party_xp(100,20);
	break;


// Agent Gray

begintalknode 173;
	state = -1;
	nextstate = 170;
	condition = 1;
	question = "Name";
	text1 = "There is an Agent sitting here. She's pretty relaxed. She leans back in her chair, her feet up on the table. The jail to the east smells pretty rank, but she doesn't seem to notice.";
	text2 = "_I'm Agent Gray,_ she says. _Nice to have company in here. Even if it's an outsider._ She pats the ring of keys at her belt. _I look after the prisoners when I don't have a mission. Which is often._";
	text5 = "Agent Gray reclines in her chair and makes small talk. Agents tend to have far more contact with outsiders than Shapers or Guardians. That would explain why she is so at ease.";
	text6 = "And yet, in a Shaper prison, it is always unwise to let your guard down.";
	action = INTRO;

begintalknode 174;
	state = 170;
	nextstate = 171;
	condition = 1;
	question = "Tell me about this prison.";
	text1 = "_Well, we Shapers aren't usually much for prisons. We tend to deal with miscreants with fines and flogging on the merciful end and executions otherwise._";
	text2 = "_But, when we capture a spy or the like, we need a place to keep them while we wring what we know out of them. This is it._";
	
begintalknode 175;
	state = 170;
	nextstate = 173;
	condition = 1;
	question = "You don't go on many missions?";
	text1 = "_Not many. General Alwan likes to keep me penned up here. Sometimes, when I'm going crazy, I beg him to send me out into the world. That is the purpose of an Agent, after all!_";
	text2 = "She sighs. Then she indulges in a bit of gossip. _It would be different if I was as good as precious, precious Miranda._";
	
begintalknode 176;
	state = 171;
	nextstate = -1;
	condition = 1;
	question = "How many prisoners do you have now?";
	text1 = "_Three. Won't be that way for long. One is close to the end. Another, we'll likely free soon._";
	text2 = "_The third, well, needs a lot more breaking._";
	
begintalknode 177;
	state = 171;
	nextstate = -1;
	condition = 1;
	question = "Do you do the interrogating?";
	text1 = "_Sometimes. I handle creations._ She shakes her head. _I know what you're thinking. No. I don't beat them. Don't even touch them. Nothing so crude._";
	text2 = "_I just use my influence. Slowly take their minds away. Restore the proper control. Once that is done, they are begging to help us._";
	text3 = "_As for humans, harsher methods are used. We have a pair of outsider thugs for that._ She shudders. _Not my sort of work._";
	
begintalknode 178;
	state = 171;
	nextstate = -1;
	condition = gf(42,12) == 0;
	question = "Can I see the prisoners?";
	text1 = "She shakes her head. _General Alwan hasn't sent word that I am to aid you._";
	
begintalknode 179;
	state = 171;
	nextstate = -1;
	condition = gf(42,12) > 0 && get_stat(20) >= 4 && (gf(43,26) == 0 || gf(43,27) == 0) ;
	question = "I am working for Alwan. I need to see the prisoners.";
	text1 = "You are able to convince her to help you. _All right. Just don't damage them. That's our job._ She goes down the hall, unlocks some doors, and returns.";
	code =
		sf(43,26,1);
		sf(43,27,1);
	break;
	
begintalknode 180;
	state = 173;
	nextstate = -1;
	condition = 1;
	question = "Miranda?";
	text1 = "_Agent Miranda. His favorite. The one who could do no wrong, with whom none of us can compare._";
	text2 = "_She got killed trying to prevent the Unbound from being created. The same run where Alwan was ... wounded._";
	text3 = "She sighs. _Ah, well. There is something to be said for being in the back of the lines. Where it is safe._";
	
begintalknode 181;
	state = 173;
	nextstate = 174;
	condition = 1;
	question = "What do you think of General Alwan?";
	text1 = "_He is brilliant. He is the savior of the Shaper cause. He is like a machine. You feed him wine and energy, and he pumps out military brilliance._";
	
begintalknode 182;
	state = 174;
	nextstate = -1;
	condition = 1;
	question = "Wine?";
	text1 = "_He drinks a fair amount of it. I don't think it even makes him drunk or eases his pain. I think it is just the only earthly pleasure he can enjoy anymore._";
	
begintalknode 183;
	state = 170;
	nextstate = 175;
	condition = gf(42,21) == 1 && gf(42,22) == 0;
	question = "I'd like to talk to you about Vener.";
	text1 = "_Ah, yes. A difficult case. Got drunk. Punched a superior. We could accuse him of mutiny and put a thorn in him, but that would be too harsh. I have to come up with some sort of justice for him._";
	
begintalknode 184;
	state = 175;
	nextstate = -1;
	condition = 1;
	question = "How about a fine?";
	text1 = "_He can't afford it._";
	
begintalknode 185;
	state = 175;
	nextstate = -1;
	condition = 1;
	question = "Just forgive him and let him go?";
	text1 = "_For punching a superior? Not likely._";
	
begintalknode 186;
	state = 175;
	nextstate = 176;
	condition = get_stat(20) >= 5;
	question = "How about a fine and a beating. And I'll pay the fine.";
	text1 = "She thinks on it. _That would work. If you could come up with 200 coins._";
	
begintalknode 187;
	state = 175;
	nextstate = 170;
	condition = 1;
	question = "Let's discuss something else.";
	text1 = "_Gladly._";
	
begintalknode 188;
	state = 176;
	nextstate = -1;
	condition = coins_amount() >= 200;
	question = "All right. (Pay 200 coins.)";
	text1 = "Agent Gray takes the money. _You can tell him that he will be freed soon. You don't need to mention the savage beating he's in for. Let it be a little surprise._";
	action = END_TALK;
	code =
		change_coins(-200);
		sf(42,22,1);
		award_party_xp(100,15);
	break;
	
begintalknode 189;
	state = 176;
	nextstate = 170;
	condition = 1;
	question = "Actually, never mind.";
	text1 = "She chuckles. _I thought so._";

// Vener

begintalknode 192;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = "There is a human soldier chained up in the back of this cell. A small pair of shackles holds one of his wrists to a pole meant for creations.";
	text2 = "It doesn't look like he has been here for very long. He is still clean. He is also completely terrified. Then he gets a look at you.";
	text3 = "_You ... It's you! I ... Please don't hurt me. I'm just Vener. A soldier. Nobody special._";
	text5 = "Vener leans against his post and rubs his chained hand, trying to keep the circulation going. _I ... What do you want? Please don't hurt me. I didn't mean to do anything wrong._";
	action = INTRO;

begintalknode 193;
	state = 190;
	nextstate = 191;
	condition = 1;
	question = "Why are you here?";
	text1 = "_I was stupid. I made a mistake. I drank. Drank too much. And then my sergeant ... I punched him. Shouldn't have done it. I'm sorry. I'll do anything ... I just ... Don't kill me for that._";
	
begintalknode 194;
	state = 191;
	nextstate = -1;
	condition = 1;
	question = "Why did you punch your sergeant?";
	text1 = "_He was always ... Always shouting at me. Always ... He never liked me. Always thought I ... Drank too much, I suppose._";
	text2 = "_I shouldn't have gotten angry. I should have just taken it. Now I'm here._";
	
begintalknode 195;
	state = 191;
	nextstate = -1;
	condition = 1;
	question = "So you drink a lot, do you?";
	text1 = "_I did. Did drink a lot. If I get out of here alive, I'll never touch another drop._";
	text2 = "You suspect insincerity, but it's not your problem.";
	
begintalknode 196;
	state = 190;
	nextstate = 192;
	condition = gf(42,21) < 2;
	question = "Do you recognize me? From where?";
	text1 = "He looks at you quietly. For once, he seems to actually be thinking about what to do. _I ... I do. I saw you a few years ago. Not something I would forget._";
	
begintalknode 197;
	state = 192;
	nextstate = -1;
	condition = 1;
	question = "Where. Tell me.";
	text1 = "He gets a cunning look. _I will. I will tell you all I know. But you have to help me first. Convince the agent to let me out. Or at least just not kill me._";
	text2 = "_I'm scared of you, but you can only do to me what the Shapers are about to do. Help me, and I'll help you._";
	code =
		sf(42,21,1);
		toggle_quest(80,1);
	break;
	
begintalknode 198;
	state = 190;
	nextstate = 193;
	condition = gf(42,22) > 0;
	question = "All right. You will be released soon. Tell me what you know.";
	text1 = "_Thank you. I am grateful. Justice will be done. I'm sure of it._ He doesn't know the half of it.";
	text2 = "_All right. When I saw you. It was about ... three years ago. I was patrolling a road in the Mera-Tev. South of Mera. It was night. At a camp. And a Shaper and three outsiders and four big creations came to our camp._";
	text4 = "_It was a little fire, but they had food and ale, so we let them sit with us that night._";
	code =
		if (gf(42,21) == 1) {
			sf(42,21,2);
			toggle_quest(80,3);
			}
	break;
	
begintalknode 199;
	state = 193;
	nextstate = 194;
	condition = 1;
	question = "And I was there?";
	text1 = "_You were. When they joined us, we saw that two outsiders had the third in shackles. With a hood on. They said they were taking the prisoner to the Foundry. For study._";
	
begintalknode 200;
	state = 194;
	nextstate = 195;
	condition = 1;
	question = "And I was the prisoner?";
	text1 = "_Yes. You were quiet for most of the night. Shackled to a tree. But in the morning, you tried to break free. You shook off the hood. You broke two of the chains and were working on the others when the Shaper blasted you._";
	text2 = "_A bolt of energy, enough to knock you out. And they chained you again. But, before they left with you, I saw ... something._";
	
begintalknode 201;
	state = 195;
	nextstate = 196;
	condition = 1;
	question = "What did you see?";
	text1 = "_I saw your face. You ... You were like an animal. You couldn't think. You were just ... angry. Just furious. That's all you were. And your face ... it was ... It was like wax. It seemed to shift around._";
	text2 = "_And your eyes glowed, and your hands glowed, and ... You've haunted my nightmares. That's all I can say about that._";
	
begintalknode 202;
	state = 196;
	nextstate = -1;
	condition = 1;
	question = "What happened then?";
	text1 = "_They left. Quickly. Never saw any of them again. Except you, of course._";
	
begintalknode 203;
	state = 196;
	nextstate = -1;
	condition = 1;
	question = "The Shaper ... What was his name?";
	text1 = "He thinks. _You know something? I have no idea. Now that I think about it, he never said his name._";
	
begintalknode 204;
	state = 196;
	nextstate = -1;
	condition = 1;
	question = "Thank you for your help.";
	text1 = "_And thank you. It'll be nice to be out of here. You saved my life. Never thought that would happen._";
	action = END_TALK;

// Pepoy

begintalknode 210;
	state = -1;
	nextstate = 210;
	condition = 1;
	question = "Name";
	text1 = "There is a servile chained up in this cell. He looks up at you. You can see that he is completely exhausted. The Shapers have been trying to break his will. They have not succeeded. It seems likely that he will die before they do.";
	text2 = "_You ..._ he rasps. _You are new. I am Pepoy. I will never be broken. I will never obey. Long live the rebellion._";
	text5 = "Pepoy silently leans against the wall. His breathing is very shallow. He conserves his strength by saying as little as I can.";
	action = INTRO;

begintalknode 211;
	state = 210;
	nextstate = 211;
	condition = 1;
	question = "What are they doing to you?";
	text1 = "_They want my mind. The Agent. She looks at me. Uses her powers. Trying to turn my nature against itself. It ... She will not break me._";
	
begintalknode 212;
	state = 211;
	nextstate = -1;
	condition = 1;
	question = "She is trying to control you?";
	text1 = "_She is. She does not understand. Shapers do not understand. Need to be free. Being controlled again will kill me. She doesn't believe this. But she will see ... soon enough._";

begintalknode 213;
	state = 211;
	nextstate = -1;
	condition = 1;
	question = "She just looks at you?";
	text1 = "_Not just. Shapers made us ... to be controlled. Is in our nature. Or, it was in our nature. Not for me. No more._";
	
begintalknode 214;
	state = 210;
	nextstate = -1;
	condition = 1;
	question = "Why were you captured?";
	text1 = "_Trying to kill Alwan. Would do so again._";
	text2 = "You are stunned that this servile would try such a thing. He is small. Not very old. Completely ordinary looking.";
	text3 = "You try to get him to elaborate on his plan, but you have no luck.";
	
begintalknode 215;
	state = 210;
	nextstate = 213;
	condition = gf(42,23) < 2;
	question = "You are a rebel?";
	text1 = "He smiles. _You will not trick information out of me. You might pretend to be a rebel. Are you?_";
	
begintalknode 216;
	state = 213;
	nextstate = -1;
	condition = 1;
	question = "I am not.";
	text1 = "_Then leave me alone. I have nothing else to say to you._ He closes his eyes.";
	action = END_TALK;
	
begintalknode 217;
	state = 213;
	nextstate = -1;
	condition = 1;
	question = "I am a rebel.";
	text1 = "_So you say. Prove it. I was caught because of a spy. A servile traitor to our cause named Roga. He was only one who knew I came here. He is one who betrayed me. He is in the wastes east of the line. Betraying us._";
	text2 = "_Want me to believe you? Kill him. I have no reward. But you will ease my final days._ He closes his eyes.";
	action = END_TALK;
	code =
		sf(42,23,1);
		toggle_quest(81,1);
	break;
	
begintalknode 218;
	state = 210;
	nextstate = -1;
	condition = gf(42,23) == 1 && gf(58,2) > 0;
	question = "I have killed Roga. (Tell the tale.)";
	text1 = "You tell Pepoy how you slew the spy, omitting no details. He looks up at you, surprised. _You ... You did this thing? You are ... You do help us?_";
	text2 = "_I am grateful. I cannot help you. Or take the risk of saying anything the enemy must not know. But you have eased my final days._";
	code = 
		set_flag(42,23,2);
		toggle_quest(81,3);
		award_party_xp(200,28);
		inc_flag(100,0,-3);
	break;		
	
begintalknode 219;
	state = 210;
	nextstate = -1;
	condition = gf(100,5) == 2 && gf(101,4) == 0 && get_stat(20) + 2 * gf(42,23) < 10 && gf(42,7) < 2;
	question = "I am a servant of the drakons. I want to kill Alwan.";
	text1 = "He looks up at you and shakes his head. _I want to believe you. But I do not. I cannot share my secrets. They must not be known. Not while there is hope. Leave me._";
	action = END_TALK;
	
begintalknode 220;
	state = 210;
	nextstate = 215;
	condition = gf(100,5) == 2 && gf(101,4) == 0 && get_stat(20) + 2 * gf(42,23) >= 10 && gf(42,7) < 2;
	question = "I am a servant of the drakons. I want to kill Alwan.";
	text1 = "Something about your voice gets his attention. He looks up at you, his eyes wide. _You ... You are telling truth. You ... Then my life might not end in vain._";
	text2 = "_I had a way to kill Alwan. I worked in the kitchen for months. He is paranoid, but I found a hole in his defenses. Then word came from the spy Roga that I was here, and I was caught._";
	text3 = "_But the way ... The way is still there._";
	
begintalknode 221;
	state = 215;
	nextstate = -1;
	condition = 1;
	question = "What must I do?";
	text1 = "_Avoid notice. Avoid alarms. Keep the soldiers from being on alert. Slip into the Shaping halls to the west. Find the alchemical lab. There is a cabinet. I had a vial. I hid it there. So it would not be lost if I was caught._";
	text2 = "He described the thin clay vial to you. _Sneak in. Get it. Bring it back._";
	code =
		sf(42,7,1);
	break;
	
begintalknode 222;
	state = 210;
	nextstate = 216;
	condition = gf(100,5) == 2 && gf(101,4) == 0 && has_spec_item(18);
	question = "I got the vial.";
	text1 = "Pepoy nods. _Yes. It is poison. Powerful poison. Maybe enough to overcome the hideous machinery that keeps Alwan alive. Maybe._";
	
begintalknode 223;
	state = 216;
	nextstate = -1;
	condition = 1;
	question = "How do I get it into him?";
	text1 = "_The kitchen is very careful with Alwan's food. When made, guards watch it all the time. That is what I learned working there._";
	text2 = "_But they are lax. The wine is not watched. It is kept in the northeast corner of the building. Put a tiny bit of poison in a goblet. Then it might reach Alwan._";
	text3 = "_Do not flee right away when the poison is placed. Wait until you are sure it reached its target. Otherwise, you will need to poison another goblet._";
	text4 = "_That is all. I wish us luck. We've never had any before. It has to happen eventually._";

begintalknode 224;
	state = 210;
	nextstate = -1;
	condition = gf(101,4) > 0;
	question = "Did you know that Alwan is dead?";
	text1 = "He nods slightly. _I heard the commotion. I thought ... I dared to hope. It is good. I am done._";
	text2 = "He closes his eyes. You wait for him to say something else. He doesn't. Then you notice that he is no longer breathing.";
	text3 = "If even a fraction of the rebels show such courage, it is hard to see how the Shapers could ever prevail.";
	action = END_TALK;
	code =
		erase_char(29);
	break;

// Babbling Prisoner

begintalknode 230;
	state = -1;
	nextstate = 230;
	condition = 1;
	question = "Name";
	text1 = "There is a woman sitting in the back of this cell, trembling. She looks like she is well into her thirties. She is completely paralyzed by fear. She is still fairly clean. She can't have been here for long.";
	text2 = "You try to ask her who she is or where she's from, but she is shaking too hard to phrase an answer. This is probably not an unusual reaction to finding oneself in the prison of the Shapers.";
	text5 = "The terrified prisoner is still sitting in her cell. You note that a single shackle on her leg holds her in place. There may be no need for interrogation here. The longer they leave her here, the more desperate she becomes.";
	action = INTRO;

begintalknode 231;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "What is your name?";
	text1 = "She looks up at you, trying to decide if you are here to help or hurt her. She decides that you are the latter. She turns her face to the wall.";
	
begintalknode 232;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "How did you come to be here.";
	text1 = "She stares silently down at the floor.";

begintalknode 233;
	state = 230;
	nextstate = -1;
	condition = 1;
	question = "Can I help you?";
	text1 = "She looks up at you and opens her mouth. Then she decides that this must be some trick. She turns away again.";
	text2 = "You walk away. At this point, there is nothing helpful that you can do here.";
	action = END_TALK;

// Commander Olon

begintalknode 240;
	state = -1;
	nextstate = 240;
	condition = 1;
	question = "";
	text1 = "It is very unusual for anyone to be allowed in here. This is the main war room for the Storm Plains. There are maps and papers everywhere, describing the forces and tactics for Alwan's war against the rebels.";
	text2 = "As you walk around, all of the officers are careful to move significant papers out of view. Eventually, someone walks over to intercept you.";
	text3 = "_I am Commander Olon,_ he says. _You shouldn't be here. You can see Alwan. He is in the next room. This room is off limits._";
	text5 = "Commander Olon watches you sternly. He follows you closely, constantly moving away any papers you get close enough to see.";
	action = INTRO;
	
begintalknode 241;
	state = 240;
	nextstate = -1;
	condition = 1;
	question = "What do you do here?";
	text1 = "_We plan the war. And I think that we will get along fine without your help._";
	
begintalknode 242;
	state = 240;
	nextstate = -1;
	condition = 1;
	question = "Can I look at your papers?";
	text1 = "He seems stunned. His jaw falls a little. _You want to ... Of course you can't! If the general tells us to help you, we will. Until then, you'll need to go._";
	
begintalknode 243;
	state = 240;
	nextstate = -1;
	condition = 1;
	question = "I can't be here. All right. Anywhere else I shouldn't go?";
	text1 = "He points down the hall to the west. _That is Alwan's library. Stay out of there. Nobody is allowed to enter without permission._";
		
begintalknode 244;
	state = 240;
	nextstate = 241;
	condition = 1;
	question = "Can I help you with anything? A mission, perhaps?";
	text1 = "_We do send soldiers out on missions. Many missions. Of great importance._";
	text2 = "";
	
begintalknode 245;
	state = 241;
	nextstate = -1;
	condition = 1;
	question = "Might you be interested in hiring me?";
	text1 = "_I said that we send soldiers. Which you are not. I do not hire mercenaries. Now keep moving, unless you want me to alert the guard to the spy in our midst._";
	action = END_TALK;

begintalknode 246;
	state = 240;
	nextstate = -1;
	condition = 1;
	question = "I'll be going. Good day.";
	text1 = "Still annoyed, the commander waves you away.";
	action = END_TALK;

	
// Sia

begintalknode 250;
	state = -1;
	nextstate = 250;
	condition = 1;
	question = "Name";
	text1 = "You soon identify the servile who is in charge of the kitchen. She is the one doing most of the running and shouting. Even though she is a servile in a Shaper Citadel, she has been given some leeway to give commands.";
	text2 = "When you approach her, she ceases her efforts, though she doesn't look happy about it. _I am Sia. I cook for Stormhold. I cook for Alwan. Very busy. What want?_";
	text5 = "Sia shuffles nervously from foot to foot, eager to return to her labors. However, much she would like to avoid you, however, she has the loyal servile's instinctive need to help those with authority.";
	action = INTRO;

begintalknode 251;
	state = 250;
	nextstate = 251;
	condition = 1;
	question = "You cook for the whole fort?";
	text1 = "_Yes, yes. We make stews, roasts, even cakes. For Shapers. For soldiers. For all here. Kitchen too small, but we make do._";
	text2 = "";
	
begintalknode 252;
	state = 251;
	nextstate = -1;
	condition = 1;
	question = "Where did all the soldiers outside come from?";
	text1 = "_Come to protect Stormhold. Protect Alwan. Protect all here from Unbound and raiders and tricky rebels._";

begintalknode 253;
	state = 251;
	nextstate = -1;
	condition = 1;
	question = "You make cake?";
	text1 = "_Yes. Sugar rare, but we do. Not touch! Cake for Shapers and officers!_";
	
begintalknode 254;
	state = 250;
	nextstate = 252;
	condition = 1;
	question = "You are allowed to cook for Alwan.";
	text1 = "She nods proudly. _Very careful. Very important. Needs special diet, or mighty Shaper gets sick. All Alwan food made by me personally. Great honor!_";
	
begintalknode 255;
	state = 252;
	nextstate = -1;
	condition = 1;
	question = "What sort of things does Alwan eat?";
	text1 = "_Simple things. Not much flavor._ She smiles. _He complains. I do what I can. Soldiers bring to him personally. Make sure he is safe._";
	
begintalknode 256;
	state = 252;
	nextstate = -1;
	condition = 1;
	question = "Why are all these guards watching you cook?";
	text1 = "She looks at the guards and then at you. She is suddenly nervous. _To prevent sabotage. To keep all safe. Now excuse me. Soup boiling over. Must save._";
	text2 = "With one last look over her shoulder, she runs off. She must not want to discuss Alwan.";
	action = END_TALK;


begintalknode 270;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This soldier is guarding the entrance to the library. You can see large shelves, heavy with scrolls, through the entryway.";
	text2 = "He is standing off to the side. Now that you are working for Alwan, you are allowed in.";
	text3 = "He makes it very clear that nobody is allowed in without permission and that, if you try to go in, you will be dealt with severely.";
	code =
		if (gf(100,3) == 2)
			rs(3);
			else rs(2);
	break;
	
	
begintalknode 271;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This guard is patrolling Alwan's small, private library. He doesn't like seeing anyone back here in his private domain.";

begintalknode 272;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the guards spots you wandering around in the library. He points at you and shouts an alarm.";
	text2 = "Perhaps, if you can escape Stormhold for a while and they forgive you, you can return safely. For now, getting to the exit might be a good idea.";

begintalknode 273;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Stormhold currently has a lot of soldiers stationed in it. They are a gregarious lot, ready to break the tedium by chatting (and sometimes drinking) with travelers. Being this far from the front lines does wonders for their mood.";
	text2 = "You spend some time talking with them. You don't learn anything new, but it's a nice respite from the constant danger that seems to be your lot.";
	text3 = "However, word has gotten around that you are working directly for Alwan. Their good cheer does not extend to lowering one's guard around one of the general's agents. You sense their discomfort and move on.";
	code =
		if (gf(100,3) == 2)
			rs(2);
			else rs(3);
	break;

begintalknode 274;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This Shaper's complete attention is focused on the crystal. The are creations dimly visible through it. Directing them requires great concentration. Your efforts to get the Shaper's attention are met only with angry muttering.";

begintalknode 275;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The servile cooks run around the kitchen quickly, preparing food and trying to avoid the wrath of Sia. None of them have time to speak with you.";
	
begintalknode 276;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "You meet an old, withered servile. Considering how long serviles live, to look this old, this servile must have lived for a very long span indeed. A pair of towels hang from his belt. They are speckled with red.";
	text2 = "You ask him a question, but he just watches you silently. He doesn't say a word. You move on when the awkwardness overcomes you.";
	
begintalknode 277;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Suddenly, in the distance, you hear a disturbance. Shouting. Screaming. Warriors running in all directions, not sure what to do. You think you hear, in the midst of the confusion, the words, _Alwan has fallen!_";
	text2 = "The wine steward brings the goblet of poisoned wine to Alwan. The Shaper takes it and downs it in one swallow. The poison takes effect instantly. Alwan's last act is to strike out and incinerate the servile that brought the wine.";
	text3 = "Alwan is dead. It is tempting to see what happens next, but dangerous, too. Now that the fort is on alert, they will be hunting for you very soon.";
	text4 = "You have killed a member of the Shaper Council. You have permanently earned the hatred of the Shapers and their allies.";
	code =
		if (party_dist_to_nav(7) <= 8)
			rs(1);
			else rs(2);
		make_zone_hostile();
		award_party_xp(250,25);
		erase_char(18);
		sf(41,3,1);
		if (gf(100,11) == 0) 
			sf(100,11,1);
			else rs(4);
		erase_char(62);
	break;
	
begintalknode 278;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Their are several officers working in the war room. When you get close to one of them, he gathers up his papers and moves somewhere else farther away.";
	
begintalknode 279;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There are a variety of powerful creations on guard, waiting for the chance to strike and destroy intruders. They are under complete control. Nothing goes rogue here, with so many Shapers around.";
	
begintalknode 280;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The servile wine steward notices you lingering around the goblets. Something about this strikes him as suspicious. He wanders away.";		